rm(list=ls(all=TRUE))


par(mfrow=c(2,2))

par(oma=c(0,3,3,1),las=1,xpd="T",lend="round")

plot(c(-.02,0.50),c(1.2,5.8),type="n",main=expression(paste(bold("Prevalence estimate ") (hat(pi)) )),xlab="",ylab="",yaxt="n",cex.main=1.1)

text(.57,8.0,"To avoid paying a traffic ticket, I would be willing to pay a bribe to a police officer",cex=1.4)

lines(c(-.02,.5),c(1.5,1.5),col="gray")
lines(c(-.02,.5),c(2,2),col="gray")
lines(c(-.02,.5),c(2.5,2.5),col="gray")
lines(c(-.04,.52),c(3,3),col="black")
lines(c(-.04,.52),c(3.5,3.5),col="black")
lines(c(-.02,.5),c(4,4),col="gray")
lines(c(-.02,.5),c(4.5,4.5),col="gray")
lines(c(-.02,.5),c(5,5),col="gray")
lines(c(-.04,.52),c(5.5,5.5),col="black")

text(-.14,5,"Direct only",cex=1)
text(-.14,4.5,"SST only",cex=1)
text(-.14,4,"Joint",cex=1)

text(-.14,2.5,"Direct only",cex=1)
text(-.14,2,"SST only",cex=1)
text(-.14,1.5,"Joint",cex=1)

text(-.15,6.3,"response type",font=2,cex=1)
text(.25,5.7,"Costa Rican Nationals (n=3,799)",font=3,cex=1)
text(.25,3.25,"Non-Costa Rican Nationals (n=394)",font=3,cex=1)

points(0.18,5,cex=1.5,pch=19)
points(0.21,4.5,cex=1.5,pch=19)
points(0.28,4,cex=1.5,pch=19)
points(0.18,2.5,cex=1.5,pch=19)
points(0.31,2,cex=1.5,pch=19)
points(0.37,1.5,cex=1.5,pch=19)

lines(c(0.17,0.19),c(5,5),lwd=2)
lines(c(0.17,0.24),c(4.5,4.5),lwd=2)
lines(c(0.25,0.31),c(4,4),lwd=2)

lines(c(0.14,0.21),c(2.5,2.5),lwd=2)
lines(c(0.20,0.41),c(2,2),lwd=2)
lines(c(0.28,0.47),c(1.5,1.5),lwd=2)


plot(c(-.02,1.00),c(1.2,5.8),type="n",main="Diagnostic parameters (joint response model)",xlab="",ylab="",yaxt="n",cex.main=1.1)

lines(c(-.02,1.0),c(1.5,1.5),col="gray")
lines(c(-.02,1.0),c(2,2),col="gray")
lines(c(-.02,1.0),c(2.5,2.5),col="gray")
lines(c(-.06,1.04),c(3,3),col="black")
lines(c(-.06,1.04),c(3.5,3.5),col="black")
lines(c(-.02,1.0),c(4,4),col="gray")
lines(c(-.02,1.0),c(4.5,4.5),col="gray")
lines(c(-.02,1.0),c(5,5),col="gray")
lines(c(-.06,1.04),c(5.5,5.5),col="black")

text(.5,5.7,"Costa Rican Nationals (n=3,799)",font=3,cex=1)
text(.5,3.25,"Non-Costa Rican Nationals (n=394)",font=3,cex=1)

text(-.11,5.2,expression(lambda[1]^T),cex=1.1)
text(-.11,4.6,expression(lambda[1]^L),cex=1.1)
text(-.11,4.0,expression(lambda[0]^T),cex=1.1)

text(-.11,2.6,expression(lambda[1]^T),cex=1.1)
text(-.11,2.0,expression(lambda[1]^L),cex=1.1)
text(-.11,1.4,expression(lambda[0]^T),cex=1.1)

points(0.63,5,cex=1.5,pch=19)
points(0.33,4.5,cex=1.5,pch=19)
points(0.97,4,cex=1.5,pch=19)
points(0.45,2.5,cex=1.5,pch=19)
points(0.48,2,cex=1.5,pch=19)
points(0.97,1.5,cex=1.5,pch=19)

lines(c(0.57,0.71),c(5,5),lwd=2)
lines(c(0.26,0.40),c(4.5,4.5),lwd=2)
lines(c(0.96,0.98),c(4,4),lwd=2)

lines(c(0.34,0.59),c(2.5,2.5),lwd=2)
lines(c(0.32,0.60),c(2,2),lwd=2)
lines(c(0.93,1.00),c(1.5,1.5),lwd=2)

plot(c(-.02,0.50),c(1.2,5.8),type="n",main=expression(paste(bold("Prevalence estimate ") (hat(pi)) )),xlab="",ylab="",yaxt="n",cex.main=1.1)

text(.57,8.0,"I have paid, at least once, a bribe to a police officer to avoid a traffic ticket",cex=1.4)

lines(c(-.02,.5),c(1.5,1.5),col="gray")
lines(c(-.02,.5),c(2,2),col="gray")
lines(c(-.02,.5),c(2.5,2.5),col="gray")
lines(c(-.04,.52),c(3,3),col="black")
lines(c(-.04,.52),c(3.5,3.5),col="black")
lines(c(-.02,.5),c(4,4),col="gray")
lines(c(-.02,.5),c(4.5,4.5),col="gray")
lines(c(-.02,.5),c(5,5),col="gray")
lines(c(-.04,.52),c(5.5,5.5),col="black")

text(-.14,5,"Direct only",cex=1)
text(-.14,4.5,"SST only",cex=1)
text(-.14,4,"Joint",cex=1)

text(-.14,2.5,"Direct only",cex=1)
text(-.14,2,"SST only",cex=1)
text(-.14,1.5,"Joint",cex=1)

text(-.15,6.3,"response type",font=2,cex=1)
text(.25,5.7,"Costa Rican Nationals (n=3,799)",font=3,cex=1)
text(.25,3.25,"Non-Costa Rican Nationals (n=394)",font=3,cex=1)

points(0.09,5,cex=1.5,pch=19)
points(0.13,4.5,cex=1.5,pch=19)
points(0.16,4,cex=1.5,pch=19)
points(0.07,2.5,cex=1.5,pch=19)
points(0.17,2,cex=1.5,pch=19)
points(0.20,1.5,cex=1.5,pch=19)

lines(c(0.08,0.10),c(5,5),lwd=2)
lines(c(0.10,0.16),c(4.5,4.5),lwd=2)
lines(c(0.13,0.19),c(4,4),lwd=2)

lines(c(0.04,0.10),c(2.5,2.5),lwd=2)
lines(c(0.07,0.27),c(2,2),lwd=2)
lines(c(0.10,0.30),c(1.5,1.5),lwd=2)


plot(c(-.02,1.00),c(1.2,5.8),type="n",main="Diagnostic parameters (joint response model)",xlab="",ylab="",yaxt="n",cex.main=1.1)

lines(c(-.02,1.0),c(1.5,1.5),col="gray")
lines(c(-.02,1.0),c(2,2),col="gray")
lines(c(-.02,1.0),c(2.5,2.5),col="gray")
lines(c(-.06,1.04),c(3,3),col="black")
lines(c(-.06,1.04),c(3.5,3.5),col="black")
lines(c(-.02,1.0),c(4,4),col="gray")
lines(c(-.02,1.0),c(4.5,4.5),col="gray")
lines(c(-.02,1.0),c(5,5),col="gray")
lines(c(-.06,1.04),c(5.5,5.5),col="black")

text(.5,5.7,"Costa Rican Nationals (n=3,799)",font=3,cex=1)
text(.5,3.25,"Non-Costa Rican Nationals (n=394)",font=3,cex=1)

text(-.11,5.2,expression(lambda[1]^T),cex=1.1)
text(-.11,4.6,expression(lambda[1]^L),cex=1.1)
text(-.11,4.0,expression(lambda[0]^T),cex=1.1)

text(-.11,2.6,expression(lambda[1]^T),cex=1.1)
text(-.11,2.0,expression(lambda[1]^L),cex=1.1)
text(-.11,1.4,expression(lambda[0]^T),cex=1.1)

points(0.56,5,cex=1.5,pch=19)
points(0.42,4.5,cex=1.5,pch=19)
points(0.98,4,cex=1.5,pch=19)
points(0.35,2.5,cex=1.5,pch=19)
points(0.60,2,cex=1.5,pch=19)
points(0.98,1.5,cex=1.5,pch=19)

lines(c(0.47,0.67),c(5,5),lwd=2)
lines(c(0.30,0.51),c(4.5,4.5),lwd=2)
lines(c(0.97,0.99),c(4,4),lwd=2)

lines(c(0.22,0.66),c(2.5,2.5),lwd=2)
lines(c(0.26,0.76),c(2,2),lwd=2)
lines(c(0.96,1.00),c(1.5,1.5),lwd=2)

